/*
 * @Author: xiaosihan 
 * @Date: 2024-07-29 12:22:45 
 * @Last Modified by: xiaosihan
 * @Last Modified time: 2024-08-02 00:37:57
 */

import express from "express";
import database from "../database";
import ServiceBase from "./ServiceBase";

// 用户相关的服务
class UserService extends ServiceBase {


    add_user = async (req: express.Request, res: express.Response, next: express.NextFunction) => {
        const { phone } = this.getParame(req);
        const { dataValues: { user_id } } = await database.user.create({ phone });
        this.success(res, {
            msg: "add_user",
            user_id
        });

    }

    get_user = async () => {
        // const userlist = await UserService.testUser.findAll();
    }

}

const userService = new UserService();
export default userService;